package com.iota.service.impl;

import com.iota.entity.User;
import com.iota.mapper.UserMapper;
import com.iota.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.PostConstruct;

/**
 * @author xk_ya
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;
    public User findUserById(int id) throws Exception{
        return userMapper.findUserById(id);
    }

    public void deleteUser(int id) throws Exception{
        userMapper.deleteUser(id);
    }
}
